package com.xbongbong.pro.domain.dao;

import com.xbongbong.pro.domain.entity.LabelGroupEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @author guohui.zhang
 * @Title: 标签分组
 * @date 2020/11/219:16
 */
@Repository
@Mapper
public interface LabelGroupDao {
    Integer insert(LabelGroupEntity entity);

    Integer update(LabelGroupEntity entity);

    List<LabelGroupEntity> findEntitys(@Param("param") Map<String, Object> param);

    Integer getEntitysCount(@Param("param") Map<String, Object> param);

    LabelGroupEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);

    Integer sort(@Param("param") Map<String, Object> param, @Param("sortMap") Map<Long, Long> sortMap);

    Integer deleteByKey(@Param("key") Long key, @Param("corpid") String corpid);


    Integer updateBatch(@Param("list") List<LabelGroupEntity> updateConfigList, @Param("corpid") String corpid);

    void insertBatch(@Param("list")List<LabelGroupEntity> entitys);

    List<LabelGroupEntity> getByIds(@Param("list")List<Long> groupIds, @Param("corpid")String corpid);

    void deleteBatch(@Param("list") List<Long> groupIds, @Param("corpid") String corpid);

    void deleteByFormIds(@Param("list") Collection<Long> systemFormList, @Param("corpid") String corpid, @Param("appId") Long appId);
}
